package cn.hniu.service.Impl;

import cn.hniu.mapper.VideotPostsMapper;
import cn.hniu.pojo.TextPosts;
import cn.hniu.pojo.VideotPosts;
import cn.hniu.service.VideotPostsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VideotPostsServiceImpl implements VideotPostsService {

    @Autowired
    private VideotPostsMapper videotPostsMapper;

    @Override
    public List<VideotPosts> findVideotPosts(String data, Integer begin, Integer size) {
        return videotPostsMapper.findVideotPosts(data,begin,size);
    }

    @Override
    public Integer updateVideotPosts(VideotPosts videotPosts) {
        return videotPostsMapper.updateById(videotPosts);
    }

    @Override
    public Integer deleteVideotPosts(Integer id) {
        return videotPostsMapper.deleteById(id);
    }

    @Override
    public List<VideotPosts> findVideotPostsBytHot() {
        return videotPostsMapper.findVideotPostsBytHot();
    }
}
